package cn.iocoder.yudao.im.controller.admin;


import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.im.domain.NoticeImPublicMessage;
import cn.iocoder.yudao.im.service.NoticeImPublicMessageService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 群发消息记录表 前端控制器
 * </p>
 *
 * @author zcc
 * @since 2024-06-26
 */
@RestController
@RequestMapping("/log/message")
public class NoticeImPublicMessageController {

    @Resource
    NoticeImPublicMessageService publicMessageService;

    @PostMapping("/send")
    public CommonResult sendMessage(@Valid @RequestBody NoticeImPublicMessage vo) {
        return CommonResult.success(publicMessageService.sendMessage(vo));
    }
}
